<?php
/**
 * Created by PhpStorm.
 * User: admin
 * Date: 2017/9/25
 * Time: 9:22
 */

namespace app\common\model;


class RoleUser extends BaseModel
{
    protected $table = 'ng_role_user';
    protected $createTime = 'created_at';
    protected $updateTime = 'updated_at';

    protected $hidden = ['id', 'created_at', 'updated_at', 'deleted_at'];

    public function node()
    {
        return $this->belongsTo('Node', 'node_id', 'id');
    }

    public function role()
    {
        return $this->belongsTo('Role', 'role_id', 'id');
    }

    public function user()
    {
        return $this->belongsTo('User', 'user_id', 'id');
    }




}